import request from "@/utils/request";

// 获取数据列表
export const getCarModels = (params) => {
  return request({
    url: "/manager/truckType/page",
    method: "get",
    params,
  });
};

// 查找车辆信息
export const getCarEvery = (id) => {
  return request({
    url: "/manager/truckType/page",
    method: "get",
    params: {
      id,
    },
  });
};

// 添加
export const addCarEvery = (data) => {
  return request({
    url: "/manager/truckType",
    method: "post",
    data,
  });
};

// 提交编辑
export const editCarEvery = (id, data) => {
  return request({
    method: "put",
    url: `/manager/truckType/${id}`,
    data,
  });
};

// 删除
export const deleteCar = (id) => {
  return request.delete(`/manager/truckType/${id}`);
};

// 搜索
export const souCarEvery = (params) => {
  return request({
    method: "get",
    url: "/manager/truckType/page",
    params,
  });
};
